<div class="card-block dt-responsive">

    <div class="table-responsive">
        <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">

            <table class="table table-striped table-bordered table-hover">
                <thead>
                <tr>
                    <g:sortableColumn property="address" title="单位地址"/>
                    <g:sortableColumn property="type" title="地址类型"/>
                    <g:sortableColumn property="zip" title="邮政编码"/>
                    <g:sortableColumn property="country" title="国家"/>
                    <g:sortableColumn property="province" title="省份"/>
                    <g:sortableColumn property="city" title="城市"/>
                    <g:sortableColumn property="lead" title="分组"/>
                    <g:sortableColumn property="activity" title="活动"/>
                    <g:sortableColumn property="contact" title="联系人"/>
                    <g:sortableColumn property="campaign" title="市场活动"/>
                    <g:sortableColumn property="opportunity" title="商机"/>
                    <g:sortableColumn property="createdDate" title="创建时间"/>
                    <g:sortableColumn property="modifiedDate" title="修改时间"/>
                    <g:sortableColumn class="text-center" width="8%" property="buildTime" title="操作"/>

                </tr>
                </thead>
                <tbody>
                <g:each in="${addressList}">
                    <tr>
                        <td>
                            <g:link controller="address" action="show" id="${it?.id}"
                                    class="firstTd">${it?.address}</g:link>
                        </td>
                        <td>${it?.type?.name}</td>
                        <td>${it?.zip}</td>
                        <td>${it?.country?.name}</td>
                        <td>${it?.province?.name}</td>
                        <td>${it?.city?.name}</td>
                        <td>${it?.lead?.fullName}</td>
                        <td>${it?.activity?.name}</td>
                        <td>${it?.contact?.fullName}</td>
                        <td>${it?.campaign}</td>
                        <td>${it?.opportunity?.serialNumber}</td>

                        <td><g:formatDate date="${it?.createdDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                        <td><g:formatDate date="${it?.modifiedDate}"
                                          format="yyyy-MM-dd HH:mm:ss"></g:formatDate></td>
                        <td class="text-center">
                            <g:link class="m-r-15 text-primary ${this.addressPermission?.name == 'Read' ? 'disabled' : ''}"
                                    controller="address" action="edit"
                                    id="${it?.id}" params="[teamName: this.teamName]">
                                <i class="icofont icofont-ui-edit"></i>

                            </g:link>
                            <g:form controller="address" action="delete" class="inline"
                                    id="${it.id}"
                                    method="DELETE">
                                <button class="deleteBtn text-danger ${this.addressPermission?.name == 'Read' ? 'disabled' : ''}" type="button">
                                    <i class="icofont icofont-trash"></i>

                                </button>
                            </g:form>

                        </td>
                    </tr>
                </g:each>
                </tbody>


            </table>
        </div>
    </div>

</div>
